/**
 * 通用启动入口
 */

import Vue from "vue"
import App from "./App.vue"
import { createRouter } from "./router"
import VueMeta from "vue-meta"
import {createStore} from "./store"

Vue.use(VueMeta)
Vue.mixin({
  metaInfo:{
    titleTemplate:'%s - 拉钩教育'
  }
})

export function createApp(){
  const router=createRouter()
  const store=createStore()
  const app=new Vue({
    router, //把路由挂在到Vue根实例中
    store,//把容器挂在到Vue根实例中
    render:h=>h(App)
  })
  return {app,router,store} 
}